﻿/*
 * Copyright © 2025−2026 WEI.ZHOU (Willis) (Chengdu). All rights reserved.
 *
 * THIS SOURCE CODE IS PROPRIETARY AND CONFIDENTIAL.
 * It is the exclusive property of WEI.ZHOU (Willis) and may not be
 * used, copied, distributed, or disclosed outside of WEI.ZHOU (Willis)
 * without express written permission.
 *
 * This code is provided to WEI.ZHOU (Willis) under a limited, 
 * non-transferable internal license, and is for use only with the author's 
 * approved purposes. No external license is granted or implied.
 *
 * Any unauthorized use, reproduction, or distribution is strictly prohibited
 * and may result in severe civil and criminal penalties.
 */

using Oracle.ManagedDataAccess.Client;
using System.Data;

namespace Aore.Core.Factorys.DbConnection;

public class OracleConnectionFactory: IDbConnectionFactory
{

  private readonly string? _connectionString;

  public OracleConnectionFactory(string? connectionString)
  {
    _connectionString = connectionString;
  }

  public IDbConnection CreateConnection()
  {
    var connection = new OracleConnection(_connectionString);
    return connection;
  }
}